package com.hnhy.hnhyscms_ws.service.impl;

import com.hnhy.hnhyscms_ws.dao.ICpstorageDao;
import com.hnhy.hnhyscms_ws.entity.Cpstorage;
import com.hnhy.hnhyscms_ws.service.ICpstorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CpstorageService implements ICpstorageService {
    @Autowired
    private ICpstorageDao iCpstorageDao;

    @Override
    public List<Cpstorage> getAllProducts() {
        return iCpstorageDao.getAllProducts();
    }

    @Override
    public Cpstorage getByProductNo(String productNo) { return iCpstorageDao.getByProductNo(productNo); }

    @Override
    public void addProducts(Cpstorage cpstorage) { iCpstorageDao.addProducts(cpstorage); }

    @Override
    public Cpstorage findMaxId() { return iCpstorageDao.findMaxId(); }

    @Override
    public void updateByProductNo(Cpstorage cpstorage) { iCpstorageDao.updateByProductNo(cpstorage); }

    @Override
    public void changeByProductNo(Cpstorage cpstorage) {
        iCpstorageDao.changeByProductNo(cpstorage);
    }

    @Override
    public void deleteByProductNo(String productNo) {
        iCpstorageDao.deleteByProductNo(productNo);
    }
}
